package com.wang.lotterysystem.controller.param;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.List;

@Data
public class CreateActivityParam implements Serializable {

    @Schema(description = "活动名称")
    @NotBlank(message = "活动名称不能为空")
    private String activityName;

    @Schema(description = "活动描述")
    private String description;

    @Schema(description = "活动奖品列表")
    @NotEmpty(message = "活动奖品不能为空")
    private List<ActivityPrize> activityPrizeList;

    @Schema(description = "活动人员列表")
    @NotEmpty(message = "活动人员不能为空")
    private List<ActivityUser> activityUserList;

    //静态内部类
    @Data
    public static class ActivityPrize implements Serializable{
        @Schema(description = "奖品id")
        @NotBlank(message = "奖品id不能为空")
        private Long prizeId;

        @Schema(description = "奖品数量")
        @NotBlank(message = "奖品数量不能为空")
        private Long prizeAmount;

        @Schema(description = "奖品等级")
        @NotBlank(message = "奖品等级不能为空")
        private String prizeTiers;
    }

    @Data
    public static class ActivityUser implements Serializable{

        @Schema(description = "用户id")
        @NotBlank(message = "用户id不能为空")
        private Long userId;

        @Schema(description = "用户名")
        @NotBlank(message = "用户名不能为空")
        private String userName;
    }
}